package com.quickask.entity;

import java.io.Serializable;

/**
 * Created by NaSa on 2015/10/7.
 */
public class AsknowAL implements Serializable {

    private AsknowAnswerSetEntity asknowAnswerSetEntity;
    private AsknowAnswerLocationSetEntity asknowAnswerLocationSetEntity;
    private Double distance;

    public AsknowAnswerLocationSetEntity getAsknowAnswerLocationSetEntity() {
        return asknowAnswerLocationSetEntity;
    }

    public void setAsknowAnswerLocationSetEntity(AsknowAnswerLocationSetEntity asknowAnswerLocationSetEntity) {
        this.asknowAnswerLocationSetEntity = asknowAnswerLocationSetEntity;
    }

    public AsknowAnswerSetEntity getAsknowAnswerSetEntity() {
        return asknowAnswerSetEntity;
    }

    public void setAsknowAnswerSetEntity(AsknowAnswerSetEntity asknowAnswerSetEntity) {
        this.asknowAnswerSetEntity = asknowAnswerSetEntity;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AsknowAL)) return false;

        AsknowAL asknowAL = (AsknowAL) o;

        if (asknowAnswerSetEntity != null ? !asknowAnswerSetEntity.equals(asknowAL.asknowAnswerSetEntity) : asknowAL.asknowAnswerSetEntity != null)
            return false;
        if (asknowAnswerLocationSetEntity != null ? !asknowAnswerLocationSetEntity.equals(asknowAL.asknowAnswerLocationSetEntity) : asknowAL.asknowAnswerLocationSetEntity != null)
            return false;
        return !(distance != null ? !distance.equals(asknowAL.distance) : asknowAL.distance != null);

    }

    @Override
    public int hashCode() {
        int result = asknowAnswerSetEntity != null ? asknowAnswerSetEntity.hashCode() : 0;
        result = 31 * result + (asknowAnswerLocationSetEntity != null ? asknowAnswerLocationSetEntity.hashCode() : 0);
        result = 31 * result + (distance != null ? distance.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "AsknowAL{" +
                "asknowAnswerSetEntity=" + asknowAnswerSetEntity +
                ", asknowAnswerLocationSetEntity=" + asknowAnswerLocationSetEntity +
                ", distance=" + distance +
                '}';
    }
}
